Class_name = "CTurret"
object_name = "TurretFE2b_1"

[COCKPIT_LIMITS]
x= -0.3, 0.2
y= -0.2, 0.6
z= -0.5, 0.5
[END]

[OPEN_COCKPIT_LIMITS]
x= -0.3, 0.2
y= -0.2, 0.6
z= -0.6, 0.6
[END]

VisualImage=0,"graphics/planes/FE2b/FE2b-C1-low.mgm",1
VisualImage=1,"graphics/planes/FE2b/FE2b-C1.mgm",0
KeepNetworkImages=true

CollisionBody="graphics/planes/FE2b/BristolF2B-C1.col"

VisualRadius=5.0

mp_site=true

[attach=0]
	position = 0.0, -0.58, 0.0	// 0.0, -0.2, 0.0      
	object = "LuaScripts/WorldObjects/Bots/BotGunner_FE2b_RAF17.txt"
[end]

[attach=1]
	position = 0.0, 0.0, 0.0
	object = "LuaScripts/WorldObjects/TurretRiffle.txt"
[end]

[attach=2]
	position = 0.0, 0.0, 0.0
	object = "LuaScripts/WorldObjects/TurretCamera.txt"
[end]

TargetingScript = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_ENG_7-7x56_APsmk.bin"

SoundScript="LuaScripts/Sound/Planes/FE2b_T1.cfg"

Script="LuaScripts/ObjectScripts/Planes/_FE2b_C1.sc"

//DropsArg=100
//HumidityArg=101

SetCockpitArgs=true	// true -             , false -              

//CockpitArg= FetchType, CmdID, SubcmdID, ArgNum, ArgValDefault, SmoothingType, SmoothingPower, NetworkFlag
//FetchType=-1:       
//FetchType=-2:         
//FetchType=-3:          parent-
//FetchType>=0:          child-   Attach ID
//CmdID=[0..999]: ID    ,    .
//CmdID=[1000..1999]: ID    ,    .
//SubcmdID=[0..3]: ID     .
//SubcmdID=[0..1]: ID     .
//ArgNum:     / .
//ArgValDefault:      ,    .
//SmoothingType: smooth_clamp -  - 
//SmoothingType: smooth_wrap -   
//SmoothingPower:   
//NetworkFlag="":           ,  SetCockpitArgs=false
//NetworkFlag="low_freq":     ,       ,    
//NetworkFlag="med_freq":     ,       ,    
//NetworkFlag="high_freq":     ,       ,    
//NetworkFlag="granted_single":     ,       ,     

CockpitArg = -2, 0000, 0, 9181, 0.0, "smooth_clamp", 0.0, "granted_single" //     
CockpitArg = -2, 0001, 0, 9044, 0.0, "smooth_clamp", 0.5, "med_freq" //     
CockpitArg = -2, 0000, 0, 9281, 0.0, "smooth_clamp", 0.0, "granted_single" //     
CockpitArg = -2, 0001, 0, 9144, 0.0, "smooth_clamp", 0.5, "med_freq" //     

[TurretsPos=0]
	position = 0.212, 0.203, -0.454
	PosMoveArg = 21000
	SeatArg=22111
	SeatUpTime=0.3
	SeatDownTime=0.3
	defaultturretpos = false
	BotAnimatorIndex = 0	// (      )  ()

	ReloadDelay = 0.3
	BotRotaionValueZ = 0.0	//-2.0
	LegsParameter = 0.0
	BotMinFirstAngle  = -100
	BotMaxFirstAngle  = -30
	BotMinSecondAngle = -45
	BotMaxSecondAngle = 45
	FirstToSecondInterp = 0.0
	BotAttachJointId = 0
	BotFirstAnimJointId = 0
	BotSecondAnimJointId  = 1

	relativeBotStand = 0.0, 0.0, 0.0
	relativeBotSit = 0.0, 0.0, 0.0
	relativeBotDead = 0.0, 0.0, 0.0
	TransitionStandPower = 1
	TransitionDeadPower = 1
	
	LockTurretCamera=false
	
	// Joints in orientation order!!!
	[Joint=0]
		SectorAngleMin = -100.0
		SectorAngleMax = -30.0
		DefaultPos = 0.142857
		BotAnimatorIndex = 0	// (      )  ()

		AngularSpeed   = 120.0

		AnimationArgMin = 0.402778
		AnimationArgMax = 0.597222

		AnimationArgNum = 21006

		Point = 0.001, 0.046, 0.0
		Axis = 0.0, 1.0, 0.0

		SoundNumber = 1
	[end]

	[Joint=1]
		SectorAngleMin = -45.0
		SectorAngleMax = 45.0
		DefaultPos = 0.833333
		
		AngularSpeed   = 120.0

		AnimationArgMin = 0.375
		AnimationArgMax = 0.625

		AnimationArgNum = 21007

		Point = 0,0,0
		Axis = 0.0, 0.0, 1.0

		SoundNumber = 2

		NoMoveFar=true	// Block rotation when the target is in the rear henisphere
	[end]

	[GunAnimation=0]
		FireArg = 9040
	[end]

	FireLightArg=60220

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = 0.0, -0.577350, -1.0
	AimSector=-110, -30, -65, 65	//AI aim limits: left, right, down, up

	CamDisplacement = -0.524, 0.231, 0.0
[end]

[TurretsPos=1]
	position = 0.501, 0.203, 0
	PosMoveArg = 21000
	SeatArg=22111
	SeatUpTime=0.3
	SeatDownTime=0.3
	defaultturretpos = true
	IdlePos = true
	BotAnimatorIndex = 0	// (      )  ()

	ReloadDelay = 0.3
	BotRotaionValueZ = 0.0	//-2.0
	LegsParameter = 0.0
	BotMinFirstAngle  = -35
	BotMaxFirstAngle  = 35
	BotMinSecondAngle = -45
	BotMaxSecondAngle = 45
	FirstToSecondInterp = 0.0
	BotAttachJointId = 0
	BotFirstAnimJointId = 0
	BotSecondAnimJointId  = 1

	relativeBotStand = 0.0, 0.0, 0.0
	relativeBotSit = 0.0, 0.0, 0.0
	relativeBotDead = 0.0, 0.0, 0.0
	TransitionStandPower = 1
	TransitionDeadPower = 1
	
	LockTurretCamera=false
	
	// Joints in orientation order!!!
	[Joint=0]
		SectorAngleMin = -35.0
		SectorAngleMax = 35.0
		DefaultPos = 0.5

		AngularSpeed   = 120.0

		AnimationArgMin = 0.402778
		AnimationArgMax = 0.597222

		AnimationArgNum = 21006

		Point = 0.001, 0.046, 0.0
		Axis = 0.0, 1.0, 0.0

		SoundNumber = 1
	[end]

	[Joint=1]
		SectorAngleMin = -45.0
		SectorAngleMax = 45.0
		DefaultPos = 0.833333

		AngularSpeed   = 120.0

		AnimationArgMin = 0.375
		AnimationArgMax = 0.625

		AnimationArgNum = 21007

		Point = 0,0,0
		Axis = 0.0, 0.0, 1.0

		SoundNumber = 2

		NoMoveFar=true	// Block rotation when the target is in the rear henisphere
	[end]

	[GunAnimation=0]
		FireArg = 9040
	[end]

	FireLightArg=60220

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = 1.0, -0.577350, 0.0
	AimSector=-40, 40, -65, 65	//AI aim limits: left, right, down, up

	CamDisplacement = -0.524, 0.231, 0.0
[end]

[TurretsPos=2]
	position = 0.211, 0.203, 0.455
	PosMoveArg = 21000
	SeatArg=22111
	SeatUpTime=0.3
	SeatDownTime=0.3
	defaultturretpos = false
	BotAnimatorIndex = 0	// (      )  ()

	ReloadDelay = 0.3
	BotRotaionValueZ = 0.0	//-2.0
	LegsParameter = 0.0
	BotMinFirstAngle  = 30
	BotMaxFirstAngle  = 100
	BotMinSecondAngle = -45
	BotMaxSecondAngle = 45
	FirstToSecondInterp = 0.0
	BotAttachJointId = 0
	BotFirstAnimJointId = 0
	BotSecondAnimJointId  = 1

	relativeBotStand = 0.0, 0.0, 0.0
	relativeBotSit = 0.0, 0.0, 0.0
	relativeBotDead = 0.0, 0.0, 0.0
	TransitionStandPower = 1
	TransitionDeadPower = 1
	
	LockTurretCamera=false
	
	// Joints in orientation order!!!
	[Joint=0]
		SectorAngleMin = 30.0
		SectorAngleMax = 100.0
		DefaultPos = 0.857143

		AngularSpeed   = 120.0

		AnimationArgMin = 0.402778
		AnimationArgMax = 0.597222

		AnimationArgNum = 21006

		Point = 0.001, 0.046, 0.0
		Axis = 0.0, 1.0, 0.0

		SoundNumber = 1
	[end]

	[Joint=1]
		SectorAngleMin = -45.0
		SectorAngleMax = 45.0
		DefaultPos = 0.833333
		
		AngularSpeed   = 120.0

		AnimationArgMin = 0.375
		AnimationArgMax = 0.625

		AnimationArgNum = 21007

		Point = 0,0,0
		Axis = 0.0, 0.0, 1.0

		SoundNumber = 2

		NoMoveFar=true	// Block rotation when the target is in the rear henisphere
	[end]

	[GunAnimation=0]
		FireArg = 9040
	[end]

	FireLightArg=60220

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = 0.0, -0.577350, 1.0
	AimSector=30, 110, -65, 65	//AI aim limits: left, right, down, up

	CamDisplacement = -0.524, 0.231, 0.0
[end]

[TurretsPos=3]
	position = -0.593, 1.164, 0.079
	PosMoveArg = 21000
	SeatArg=22111
	SeatUpTime=0.3
	SeatDownTime=0.3
	defaultturretpos = false
	BotAnimatorIndex = 1	// (      )  ()

	ReloadDelay = 0.3
	BotRotaionValueZ = 0.0	//-2.0
	LegsParameter = 0.0
	BotMinFirstAngle  = -54
	BotMaxFirstAngle  = 54
	BotMinSecondAngle = -54
	BotMaxSecondAngle = 54
	FirstToSecondInterp = 0.0
	BotAttachJointId = 1
	BotFirstAnimJointId = 1
	BotSecondAnimJointId  = 2

	relativeBotStand = 0.0, 0.0, 0.0
	relativeBotSit = 0.0, 0.0, 0.0
	relativeBotDead = 0.0, 0.0, 0.0
	TransitionStandPower = 1
	TransitionDeadPower = 1
	
	LockTurretCamera=false
	
	// Joints in orientation order!!!
	[Joint=0]
		SectorAngleMin = 179.999
		SectorAngleMax = -179.999
		DefaultPos = 0.5

		AngularSpeed   = 60.0

		AnimationArgMin = 0.5
		AnimationArgMax = 0.5

		AnimationArgNum = -1

		Point = 0,0,0
		Axis  = 0.0,1.0,0.0
	[end]

	[Joint=1]
		SectorAngleMin = -54.0
		SectorAngleMax = 54.0
		DefaultPos = 0.5

		AngularSpeed   = 120.0

		AnimationArgMin = 0.350000
		AnimationArgMax = 0.650000

		AnimationArgNum = 21106

		Point = 0.001, 0.046, 0.0
		Axis = 0.0, 1.0, 0.0

		SoundNumber = 1
	[end]

	[Joint=2]
		SectorAngleMin = -45.0
		SectorAngleMax = 45.0
		DefaultPos = 0.166667
		
		AngularSpeed   = 120.0

		AnimationArgMin = 0.375
		AnimationArgMax = 0.625

		AnimationArgNum = 21107

		Point = 0,0,0
		Axis = 0.0, 0.0, 1.0

		SoundNumber = 2

		NoMoveFar=true	// Block rotation when the target is in the rear henisphere
	[end]

	[GunAnimation=0]
		FireArg = 9140
	[end]

	FireLightArg=60240

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = -1.0, 0.577350, 0.0
	AimSector=140, 220, -65, 65	//AI aim limits: left, right, down, up

	CamDisplacement = -0.524, 0.228, -0.001
[end]

[TurretsGun=0]
	LinkedTurretPos = 0,1,2
//	Convex = "gun0"
	DGroup="MachineGun1"
	DamageProp = 0.25

	Displacement = 0.645, 0.064, 0.0
	GunsightPosition = -0.524, 0.231, 0.0
	ParallaxDistance = 400.0

	GunType = "LuaScripts/WorldObjects/Weapons/MG_ROF_Lewis.txt"

	ReLoadingStagesTime = 1.0, 3.0, 1.0, 0.3

	ReservedMagazinesArgIdx = 9181
	FlashAnimationArgIdx = 9040
	TriggerPositionArgIdx = 9000
	RoundsInMagazineArgIdx = 9046
	HideAmmunitionArgIdx = 9045
	ReLoadingArgIdx = 9044
	AzimuthDeviationArgIdx = 9012
	ElevationDeviationArgIdx = 9013
	FiringPinPositionArgIdx = 9016

	BarrelTemperatureDecreaseCorrectionData = 1.0, 4.0, 300.0 //         :
	//   -        , [.], (>=0), default = 1
	//   -        ,       ,   , [.], (>=  ),  : 1.0
	//   -      ,              , [/], (>=0),  : 0.0

	CarriageAdditionalBulletDispertionAngle = 0.0368, 0.1838 //     ()     ,      :
	//   -        , [], (>=0)
	//   -          , [], (>=  )

	NumOfAnimations = 4

	BushCoord = -0.136, 0.072, 0.037
	BushSpeed = 0.0, 0.0, 1.0

	BushConfig = "LuaScripts/WorldObjects/Trash/Batch_case07-08mm.txt"

	SoundNumber = 1
[end]

[TurretsGun=1]
	LinkedTurretPos = 3
//	Convex = "gun0"
	DGroup="MachineGun2"
	DamageProp = 0.25

	Displacement = 0.645, 0.064, 0.0
	GunsightPosition = -0.524, 0.231, 0.0
	ParallaxDistance = 400.0

	GunType = "LuaScripts/WorldObjects/Weapons/MG_ROF_Lewis.txt"

	ReLoadingStagesTime = 1.0, 3.0, 1.0, 0.3

	ReservedMagazinesArgIdx = 9281
	FlashAnimationArgIdx = 9140
	TriggerPositionArgIdx = 9100
	RoundsInMagazineArgIdx = 9146
	HideAmmunitionArgIdx = 9145
	ReLoadingArgIdx = 9144
	AzimuthDeviationArgIdx = 9112
	ElevationDeviationArgIdx = 9113
	FiringPinPositionArgIdx = 9116

	BarrelTemperatureDecreaseCorrectionData = 1.0, 4.0, 300.0 //         :
	//   -        , [.], (>=0), default = 1
	//   -        ,       ,   , [.], (>=  ),  : 1.0
	//   -      ,              , [/], (>=0),  : 0.0

	CarriageAdditionalBulletDispertionAngle = 0.0368, 0.1838 //     ()     ,      :
	//   -        , [], (>=0)
	//   -          , [], (>=  )

	NumOfAnimations = 4

	BushCoord = -0.136, 0.072, 0.037
	BushSpeed = 0.0, 0.0, 1.0

	BushConfig = "LuaScripts/WorldObjects/Trash/Batch_case07-08mm.txt"

	SoundNumber = 2
[end]

[Ammunition0]
	GunAmmunition0=0
	GunAmmunition1=0
[end]
[GunAmmunition0]
	MaxRoundsInMagazine = 97
	RoundsInMagazine = 97
	MaxReservedMagazines = 5
	ReservedMagazines = 5
	MaxMisFiresInMagazine = 1
	AmountRoundsWithOneTracer = 3
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_ENG_7-7x56_APsmk.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_ENG_7-7x56_APsmk.txt"
[end]

SightPos = 0.0, 0.2, 0.0
PositionChangeTime = 1.0
PreEjectDuration = 4.0


//   ,         
// SectorLimits = -180.0, -175.0, +25.0, +90.0
// SectorLimits = -175.0, -143.0, +18.0, +90.0


[Entrance]
	EntrancePos= 0.0, -0.2, 0.0
	EntranceRot= 0,0,0
	JumpDir=1,7,1
[end]
[Entrance]
	EntrancePos= 0.0, -0.2, 0.0
	EntranceRot= 0,0,0
	JumpDir=-2,6,1
	SelectorDir=0,2,0	//        2/
[end]
EjectOnlyAfterPreviousGunner = false

// Damage

CockpitSafetyRate = 0.35 //impact accelerations affect on bot treshold multiplifier (default is =1.0)

SphereHitProtection=0	//  /     

Armor=0
LifeRate=50000
LifeRateFrag=5000
Firing=0.0

energyloss="",true,0.7,1000 //     , true -       -,       ,        
energyloss="gun0",true,5.0,20000 // 

[DGroup=MachineGun1]
	IsCritical=false
	LifeK=20
	convex="gun0",5,600,"MT_ARMOR"
	SphereHitProtection=5
	LifeRateFrag=600
	RepairSpeed=0.0166667	// (1 )
	RepairSource=4
	InstantRepair=true
[end]
[DGroup=MachineGun2]
	IsCritical=false
	LifeK=20
	convex="gun1",5,600,"MT_ARMOR"
	SphereHitProtection=5
	LifeRateFrag=600
	RepairSpeed=0.0166667	// (1 )
	RepairSource=4
	InstantRepair=true
[end]

NoAimingWhenOpened=false

AttackDistance   = 1500.0		//AI max aim distance versus ground point
AttackDistanceTrgGnd = 1500.0	//AI max aim distance versus ground target
AttackDistanceTrgAir = 1800.0		//AI max aim distance versus air target

AIStartAimErrModifier = 0.05		//0.1 Modifier for AI initial bracketing aim error (reduced twice with each shot)

AIAimDelayModifier = 0.1		//Modifier for AI delay before start to aim to a new target at 1000m range

ReArmTime=15 //  60,     -2  2 
